package com.holystone.orca.sys.service;

import java.util.List;
import java.util.Map;

import org.springframework.transaction.annotation.Transactional;

import com.holystone.orca.base.service.IBaseService;
import com.holystone.orca.common.PageData;
import com.holystone.orca.sys.model.StaffVO;
import com.holystone.orca.sys.mybatis.model.SysPerson;
@Transactional
public interface ISysPersonService extends IBaseService<SysPerson>{

	/**
	 * 分页，初始化用户信息和根据用户名查询用户信息
	 * @param iPageNo
	 * @param iPageSize
	 * @param orderField
	 * @param personName
	 * @return
	 * @throws Exception
	 */
	public PageData pagingSysPerson(int iPageNo, int iPageSize, String orderField, String personName) throws Exception;
	
	/**
	 * 根据用户id查询用户信息
	 * @param personId
	 * @return
	 */
	public SysPerson selectByPersonId(String personId);
	
	/**
	 * 添加用户信息
	 * @param sysPerson
	 * @return
	 * @throws Exception
	 */
	public boolean insertPerson(SysPerson sysPerson) throws Exception;
	
	/**
	 * 修改用户信息
	 * @param sysPerson
	 * @return
	 * @throws Exception
	 */
	public boolean updatePerson(SysPerson sysPerson) throws Exception;
	
	/**
	 * 删除单个用户信息
	 * @param personId
	 * @return
	 * @throws Exception
	 */
	public boolean deletePersonByPersonId(int personId) throws Exception;
	
	/**
	 * 删除选中的用户信息
	 * @param list
	 * @return
	 * @throws Exception
	 */
	public boolean delSelectPerson(List<Integer> list) throws Exception;
	
	/**
	 * 根据personCode查找person信息
	 * @param personCode
	 * @return
	 * @throws Exception
	 */
	public SysPerson selectPersonByPersonCode(String personCode) throws Exception;
	
	public StaffVO selectStaffVOByPersonCode(Map<Object, String> map)throws Exception;
	
	/**
	 * 修改密码
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public boolean editPassword(Map<Object, String> map)throws Exception;
}
 